﻿CREATE TABLE [dbo].[DomiciliosProveedores] (
    [IdDomicilioProveedor] INT          IDENTITY (1, 1) NOT NULL,
    [IdProveedor]          INT          NOT NULL,
    [IdTipoDomicilio]      TINYINT      NOT NULL,
    [IdBarrio]             INT          NOT NULL,
    [Calle]                VARCHAR (50) NOT NULL,
    [Numero]               VARCHAR (5)  NOT NULL,
    [Piso]                 VARCHAR (2)  NOT NULL,
    [Departamento]         VARCHAR (2)  NOT NULL,
    CONSTRAINT [PK_DomiciliosProveedores] PRIMARY KEY CLUSTERED ([IdDomicilioProveedor] ASC),
    CONSTRAINT [FK_DomiciliosProveedores_Proveedores] FOREIGN KEY ([IdProveedor]) REFERENCES [dbo].[Proveedores] ([IdProveedor]),
    CONSTRAINT [FK_DomiciliosProveedores_TiposDomicilios] FOREIGN KEY ([IdTipoDomicilio]) REFERENCES [dbo].[TiposDomicilios] ([IdTipoDomicilio])
);

